// 导入axios
import axios from '@/utils/request'
//

// 获取文章列表
export const articleList = (obj) => {
  return axios.get('/interview/query', {
    params: {
      current: obj.current || 1,
      pageSize: obj.pageSize || 10,
      sorter: obj.sorter
    }
  })
}

// 获取面经详情
export const articleDetail = (id) => {
  return axios.get('/interview/show', {
    params: {
      id
    }
  })
}

// 点赞或取消点赞和收藏或取消收藏
export const opt = (id, optType) => {
  return axios.post('/interview/opt', {
    id,
    optType
  })
}

// 获取点赞或收藏的列表 /h5/interview/opt/list
export const list = (optType, pageSize = 1, page = 1) => {
  return axios.get('interview/opt/list', {
    params: {
      optType,
      pageSize,
      page
    }
  })
}
export default {
  articleList
}
